From ebd759d57e1d8e8512c020fe6d9c6b18034a852d Mon Sep 17 00:00:00 2001 From: Steven Smith Date: Fri, 27 Apr 2007 13:25:58 +0100 Subject: [PATCH] 32 on 64: Don't lock up Xen if you need to do lots of grant operations in a single batch for a 32-on-64 domain. Signed-off-by: Steven Smith --- xen/common/compat/grant_table.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/xen/common/compat/grant_table.c b/xen/common/compat/grant_table.c index b080447110..aea0bfe78e 100644 --- a/xen/common/compat/grant_table.c +++ b/xen/common/compat/grant_table.c @@ -133,7 +133,7 @@ int compat_grant_table_op(unsigned int cmd, break; case GNTTABOP_transfer: - for ( n = 0; i < COMPAT_ARG_XLAT_SIZE / sizeof(*nat.xfer) && i < count && rc == 0; ++i, ++n ) + for ( n = 0; n < COMPAT_ARG_XLAT_SIZE / sizeof(*nat.xfer) && i < count && rc == 0; ++i, ++n ) { if ( unlikely(__copy_from_guest_offset(&cmp.xfer, cmp_uop, i, 1)) ) rc = -EFAULT; @@ -160,7 +160,7 @@ int compat_grant_table_op(unsigned int cmd, break; case GNTTABOP_copy: - for ( n = 0; i < COMPAT_ARG_XLAT_SIZE / sizeof(*nat.copy) && i < count && rc == 0; ++i, ++n ) + for ( n = 0; n < COMPAT_ARG_XLAT_SIZE / sizeof(*nat.copy) && i < count && rc == 0; ++i, ++n ) { if ( unlikely(__copy_from_guest_offset(&cmp.copy, cmp_uop, i, 1)) ) rc = -EFAULT; -- 2.30.2